<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
    <title>发布记录—{$config["sitename"]|default=''}</title>
    <link rel="stylesheet" href="__ADDON__/css/member_v2.css?v={:config('app_version')}">
    <!--主体内容从上到上样式-->
    <link rel="stylesheet" href="__ADDON__/css/aniamte.css">
</head>

<body>
{include file="common/top" /}
<!-- 侧边栏 end -->
<div class="main">
    <div class="wrapper">
        <!--面包屑-->
        <div class="m-top">
            <ul class="breadcrumb">
                <li><a href="{:addon_url('media/member/index')}">首页</a><span class="gt">&gt;</span><a href="{:addon_url('media/member/release')}">软文发布</a><span class="gt">&gt;</span></li>
                <li>发布记录</li>
            </ul>
        </div>
        <!--面包屑 end-->
        <div class="container fadeInUp">
            <div class="box">
                <div class="tabs">
                    <ul class="tabs-title">
                        <li class="active"><a href="{:addon_url('media/member/releaselist')}">发布记录</a></li>
                        <li><a href="{:addon_url('media/member/releasewemedialist')}">自媒体记录</a></li>
                        <li><a href="{:addon_url('media/member/releasemeallist')}">套餐记录</a></li>
                    </ul>
                    <div class="box-container introduce">
                        <div class="table">
                            <form action="" method="get">
                                <table width="100%">
                                    <tbody>
                                    <tr>
                                        <td class="left;" style="width:20%">
                                            <label class="right">标题内容</label>
                                            <input class="text" name="keyword" value="{$Request.param.keyword}" type="text" style="width:58%;" placeholder="标题内容">
                                        </td>
                                        <td class="left;" style="width:20%">
                                            <label class="right">创建时间</label>
                                            <input class="time" id="start" name="start" value="{$Request.param.start}" type="text"  style="width:58%;" placeholder="创建时间">
                                        </td>
                                        <td class="left;" style="width:20%">
                                            <label class="right">到</label>
                                            <input class="time" id="end" name="end" value="{$Request.param.end}" type="text"  style="width:78%;" placeholder="结束时间">
                                        </td>
                                        <td class="left;" style="width:19%">
                                            <label class="right">发布状态</label>
                                            <select name="status" style="width:65%;">
                                                <option value="">--请选择--</option>
                                                <option value="4">已完成</option>
                                                <option value="0">发布中</option>
                                                <option value="1">已发稿</option>
                                                <option value="5">已拒稿</option>
                                            </select>
                                        </td>
                                        <td class="left;" style="width:21%">
                                        <span class="menu">
                                            <input type="submit" value="搜 索" class="menu-blue"  style="border-radius: 4px;color: #fff;font-size: 16px;height:39px;line-height: 39px;margin:-2px 0 0 10px;padding: 0 15px;" />
                                            <a href="javascript:" class="menu-org btn2"><img src="__ADDON__/images/ai-icon-daochu.png">导出到Excel</a>
                                        </span>
                                            <span id="export"></span>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </form>
                        </div>
                        <div class="table">
                            <table style="width: 100%;">
                                <thead>
                                <tr class="f5f5f5">
                                    <th class="left" style="width: 20%;">文章标题</th>
                                    <th style="width: 10%;">发布网址</th>
                                    <th style="width: 12%;">媒体名称</th>
                                    <th style="width: 10%;">金额</th>
                                    <th style="width: 10%;">发布状态</th>
                                    <th class="left" style="width: 13%;">拒绝原因</th>
                                    <th style="width: 14%;">提交时间</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                {volist name="data_list" id="val"}
                                <tr{$key % 2 == 0 ?"" : " class='f8f8f8'"}>
                                <td class="left"  style="width: 20%;"><a href='/index.php/home/index/goodsdetail/t/goods/id/{$val["id"]}.html' target="_blank">{$val["title"]}</a></td>
                                <td>{if condition="empty($val['url']) neq true"}<a href='{$val["url"]}' class="view" target='_blank'>查看链接</a> <a href='http://view.danews.cc/pic/apinxuan_{$val["ordersn"]}/type/2/sid/1a372fb560e1ba9ab914cce7280ea657' style='color:red' target='_blank'>图</a>{/if}</td>
                                <td>{$val["media_name"]}</td>
                                <td>{$val["money"]}</td>
                                <td>{:StatusColorKh1(config("goods_status")[$val["status"]])}</td>
                                <td class="left">{$val["data"]}</td>
                                <td>{$val["createtime"]}</td>
                                <td>
                                    <a href='/index.php/home/index/goodsdetail/t/goods/id/{$val["id"]}.html' target="_blank" class="caozuo"><img src="__ADDON__/images/ai-icon-chakan.png" title="查看预览"></a>
                                    <a href='/index.php/member/goods/release.html?draftid={$val["draft_id"]}' class="caozuo"><img src="__ADDON__/images/ai-icon-fabu.png" title="再发布"></a>
                                    {if condition="($val['status']==4) OR ($val['status']==1)"}
                                    <a href="javascript:" onclick="_feed({$val['id']},'goods')" class="caozuo"><img src="__ADDON__/images/ai-icon-fankui.png" title="反馈"></a>
                                    {/if}
                                </td>
                                </tr>
                                {/volist}
                                </tbody>
                            </table>
                        </div>
                        <!-- 分页 -->
                        <div class="page-box">
                            <div class="total">
                                共 <strong>{$data_list->total()}</strong> 条 <font color="red">{$data_list->currentPage()}</font>/{$data_list->lastPage()} 每页 <strong>{$data_list->listRows()}</strong> 条
                            </div>
                            <div class="page">
                                {$data_list->render()}
                            </div>
                        </div>
                        <!-- 分页 end-->
                    </div>
                </div>

            </div>

        </div>
    </div>
</div>
<!-- 主内容 -->

<script type="text/javascript" src="__ADDON__/js/laydate/laydate.js"></script>
<script type="text/javascript">
    var menu="goods";
    var submenu="releaselist"


    $(function () {
        $("select[name='status']").val('{$Request.param.status}')

        //自定义时间日期
        var start = {
            elem: '#start',
            format: 'YYYY/MM/DD',
            istime: true,
            istoday: false,
            choose: function(datas){
                end.min = datas; //开始日选好后，重置结束日的最小日期
                end.start = datas //将结束日的初始值设定为开始日
            }
        };
        var end = {
            elem: '#end',
            format: 'YYYY/MM/DD',
            min: laydate.now(),
            istime: true,
            istoday: false,
            choose: function(datas){
                start.max = datas; //结束日选好后，重置开始日的最大日期
            }
        };
        laydate(start);
        laydate(end);
        //
        $(".btn2").click(function () {
            var keyword = encodeURIComponent($("input[name='keyword']").val());
            var start = $("input[name='start']").val();
            var end = $("input[name='end']").val();
            var status = $("select[name='status']").val();
            $("#export").html("请稍候...");
            $.post("/index.php/member/Index/builderExcel?action=goods&t=member&keyword=" + keyword + "&start=" + start + "&end=" + end + "&status=" + status, {}, function (data) {
                $("#export").html("<a href='" + data.msg + "'>点击下载</a>");
            })
        })

    })
    function _feed(id,t) {
        layer.open({
            type: 2,
            title: '反馈问题',
            shadeClose: true,
            shade: 0.8,
            area: ['800px', '510px'],
            content: '/index.php/member/goods/feedpop/id/' + id + '/type/' + t //iframe的url
        });
    }

</script>
<!-- 底部 -->
{include file="common/bottom" /}
</body>
</html>